<?php

namespace App\Common\WX\Handle;


use App\Common\Log;
use App\Common\WX\WxWord;
use EasySwoole\WeChat\Bean\OfficialAccount\RequestMsg;
use XWX\Common\H;

class WxHandle_Event_subscribe extends WxHandleBase
{
    public function funcHandle(RequestMsg $req): WxWord
    {
        //添加用户

        $word = new WxWord(null);

        $ticket = $req->getTicket();
        if (H::funcStrHasAnyText($ticket))
        {
            Log::funcLogDebug(__METHOD__, "扫码关注");

            $word = new WxWord("qr#{$ticket}");
        }
        else
        {
            Log::funcLogDebug(__METHOD__, "普通关注");


        }


        return $word;
    }
}